import React, { Component, PropTypes } from 'react';
import { Layout } from 'antd';
import Module from '../lib/module'
import PageHeader from './pageHeader/'
import CarStore from './carStore/'

const { Header, Footer, Sider, Content } = Layout;

import $ from 'jquery'

class App extends Module {
    constructor(props, context) {
        super(props, context);
        this.state = {
            height: null
        };
    }

    componentDidMount() {
        //关闭loading动画
        document.getElementById("J_app-mask-app-load").style.display = "none";
    }

    render() {
        return (
            <Layout>
                <Sider>
                    <div style={{color:"red",height:"100px",textAlign:"center"}}>
                        <img src="images/posy.jpg"  alt="" style={{width:"50px",borderRadius:"50%",margin:"5px 0"}}/>
                        <br/>
                        汽车乐园后台
                    </div>
                    <PageHeader pathname={this.props.location.pathname}/>
                </Sider>
                <Layout style={{minHeight:"650px"}}>
                    <Header className="header" style={{ background: '#fff', padding: 0 }}>
                        <div style={{float:"right",display:"inline-block",width:"230px"}}>
                            <img src="images/posy.jpg"  alt="" style={{width:"30px",borderRadius:"50%",margin:"5px 0"}}/>
                            <span style={{padding:"0 20px",fontSize:"18px"}}>Murray</span>
                            <img src="images/posy.jpg"  alt="" style={{width:"40px",borderRadius:"50%",margin:"5px 0"}}/>
                        </div>
                    </Header>
                    <Content className="container" style={{minHeight: this.state.height,backgroundColor:"rgb(240,242,245)"}}>
                        <CarStore/>
                        {this.props.children}
                    </Content>
                    <Footer style={{textAlign: "center"}}>杭州网云科技</Footer>
                </Layout>
            </Layout>
        )
    }
}

export default App;